
(function () {
    var core = ecui,
        util = core.util,
        ui = ecui.ui,
        dom = ecui.dom;

    var venues = [].concat(mao.venues);
    venues.unshift({ id: '', name: '全部' });
    Object.assign(
        NS.data,
        {
            venueOrderSortBarConfigs: [
                {
                    type: 'dateType',
                    name: 'dateType',
                    typeName: '日期',
                    active: false,
                    show: false,
                    target: 'order_by_filter',
                    value: '1',
                    data: [
                        { 'id': '1', 'name': '昨日' },
                        { 'id': '2', 'name': '本周' },
                        { 'id': '3', 'name': '上周' },
                        { 'id': '4', 'name': '本月' }
                    ]
                },
                {
                    type: 'venueId',
                    name: 'venueId',
                    typeName: '门店',
                    active: false,
                    show: false,
                    target: 'order_by_filter',
                    data: venues
                },
                {
                    type: 'status',
                    name: 'creatorType',
                    typeName: '订单来源',
                    active: false,
                    show: false,
                    target: 'order_by_filter',
                    value: '0',
                    data: [
                        { 'id': '0', 'name': '全部' },
                        { 'id': '1', 'name': '内部' },
                        { 'id': '2', 'name': '外部' }
                    ]
                }
            ],
            venueStatus: {
                region: { value: '', title: '大区', select: '', items: mao.info.baseInfo.region.map(function (item) { return { value: item.id, code: item.text }; })}
            }
        }
    );
    Object.assign(
        NS.ui,
        {
        }
    );
    ecui.esr.addRoute('venueOrder', {
        model: [''],
        weight: 2,
        frame: true,
        queryUrl: '@FORM /erp-management/venue/order/increase/detailed?venue_order_search_form',
        onbeforerequest: function (context) {
        },
        onbeforerender: function (context) {
        },
        onafterrender: function (context) {
            ecui.dispatchEvent(ecui.get('statistics-venue-order-list-view'), 'refresh');
        }
    });
}());

